package cn.edu.sdjzu.xg.bysj.domain;

import cn.edu.sdjzu.xg.bysj.domain.authority.Actor;
import lombok.*;


import java.io.Serializable;
@Setter
@Getter
@ToString
@NoArgsConstructor
@AllArgsConstructor
public final class Student extends Actor
		implements Comparable<Student>, Serializable {
	private Integer id;
	private String name;
	private String no;
	private StudentClass studentClass;
	//导师
	private Teacher supervisor;

	public Student(Integer id, String name, String no,
                    StudentClass studentClass) {
		this(name, no, studentClass);
		this.id = id;
	}

	public Student(String name, String no,
                    StudentClass studentClass) {
		this(name, no);
		this.studentClass = studentClass;
	}

	public Student(String name, String no
                   ) {
		this.name = name;
		this.no = no;
	}


	@Override
	public int compareTo(Student other) {
		// no为排序依据
		return this.no.compareTo(other.no);
	}
}
